
#ifndef MSE_ROOT_INIT_H
#define MSE_ROOT_INIT_H
#include "main.h"
#include "can.h"
#include "stdint.h"
#include "MSE_CAN.h"
#include "MSE_MATH.h"
#include "MSE_MOTOR.h"
#include "MY_define.h"

//是否在线的标志
struct MSE_ROOT_STATUS_Typedef
{
    /******************************遥控********************************/
    uint8_t RM_DBUS;
     /******************************头部电机********************************/
    uint8_t MOTOR_HEAD_HORIZONTAL_L;
    uint8_t MOTOR_HEAD_HORIZONTAL_R;
    uint8_t MOTOR_HEAD_LIFT_L;
    uint8_t MOTOR_HEAD_LIFT_R;
    uint8_t MOTOR_HEAD_SWAY;
    uint8_t MOTOR_HEAD_Yaw;
    uint8_t MOTOR_HEAD_Left;
    uint8_t MOTOR_HEAD_Right;
	uint8_t User_Crotral;
	uint8_t MOTER_HEAD_Camera;
	uint8_t MOTOR_CHASSIS_3508_1;
    uint8_t MOTOR_CHASSIS_3508_2;
    uint8_t MOTOR_CHASSIS_3508_3;
    uint8_t MOTOR_CHASSIS_3508_4;
};



struct MSE_ROOT_Typedef
{
    uint8_t MASTER_LOCATION;
    
    struct MSE_ROOT_STATUS_Typedef STATUS;
};

extern struct MSE_ROOT_Typedef MSE_ROOT;


//在定时器调用这一个函数即可
void MSE_F_ROOT(void);
//电机在线监测
uint8_t MSE_F_MOTOR_STATUS(struct MSE_MOTOR_Typedef* MOTOR);
//总的状态监测
void MSE_F_ROOT_ALL_STATUS(void);
uint8_t MSE_F_MASTER_LOCATION_JUDGE(void);
#endif

